package com.atom.dbflow

import com.raizlabs.android.dbflow.annotation.Column
import com.raizlabs.android.dbflow.annotation.PrimaryKey
import com.raizlabs.android.dbflow.annotation.Table
import com.raizlabs.android.dbflow.structure.BaseModel
import java.util.*

@Table(database = DBFlowDatabase::class)
class User : BaseModel {
    @Column
    @PrimaryKey
    var id: String? = null

    @Column(length = 32)
    var name: String? = null

    @Column(length = 32)
    var createAt: Date? = null

    @Column(length = 32)
    var updateAt: Date? = null

    @Column
    var sex: Boolean = true

    fun isSex(): Boolean = sex

    constructor() : super()

    override fun toString(): String {
        return "User(id=$id, name=$name, createAt=$createAt, updateAt=$updateAt)"
    }
}